#include "GeometryObject.h"

/* Initializing static data members */
std::vector< CGeometryObject* > CGeometryObject::m_GeometryObjects;
mUInt CGeometryObject::m_uSumPolygonsCount = 0;

CGeometryObject::CGeometryObject( )
{
    m_GeometryObjects.push_back(this);
}

mUInt CGeometryObject::GetNumPolygons( )
{
    return m_uSumPolygonsCount;
}


void CGeometryObject::UpdateNumPolygons( )
{
    m_uSumPolygonsCount = 0;
    for each (CGeometryObject *pObj in  m_GeometryObjects)
    {
        m_uSumPolygonsCount += pObj->NumPolygons();
    }
}
